{% extends 'base.html' %}
{% load static %}
{% block title %}投票详情{% endblock %}
{% block content %}
    <h1>投票详情</h1>
    <div class="h3">{{ question.question_text }}</div>
    <hr>
    {% if question.choice_set.all %}
        <form action="{% url 'vote' question_id=question.id %}" method="post">
            {% for choice in question.choice_set.all %}
                <div class="radio h4">
                    <label>
                        <input type="radio" name="choice_id" value="{{ choice.id }}">
                        {{ choice.choice_text }}
                    </label>
                </div>
            {% endfor %}
            <div class="form-group">
                <input class="btn btn-primary" type="submit" value="投 票">
            </div>
        </form>
    {% else %}
        <h2>没有开始</h2>
    {% endif %}
{% endblock %}